class Person():

    def __init__(self,name,age):
        self._name = name
        self._age =age

    @property   #get方法
    def name(self):
        return self._name

    @property
    def age(self):
        return self._age

    @name.setter    #set方法
    def name(self,name):
        self._name =name
    
    @age.setter
    def age(self, age):
        self._age =age

p = Person('骂死',18)
p.name='zbj'
p.age=20
print(p.name,p.age)
